{ "cells": [ { "cell_type": "markdown", "id": "04b29489-f417-429c-9cfe-9cda27df0837", "metadata": {}, "source": [ "# Example of the rain event detection and rainfall retrieval using the nearby appraoch from [Overeem et al. (2016)](https://doi.org/10.5194/amt-9-2425-2016)" ] }, { "cell_type": "code", "execution_count": 1, "id": "ffc68525-6604-4256-8d5f-90e9b7a9e9b0", "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pycomlink as pycml\n", "import xarray as xr\n", "\n", "import pycomlink.processing.wet_dry.nearby_wetdry as nearby_wetdry\n", "import pycomlink.processing.nearby_rain_retrival as nearby_rain\n" ] }, { "cell_type": "markdown", "id": "56db3b45-f074-4f07-acd7-ec06cfef095e", "metadata": {}, "source": [ "## Load data and prepare data" ] }, { "cell_type": "markdown", "id": "9a62b4fb-a202-464a-99e7-5445dedcda17", "metadata": {}, "source": [ "We load the example data from one NetCDF file which contains the time series of 500 CMLs over 10 days. If you want to use your own data, e.g. from a CSV file, look at the respective example notebook for how to get started." ] }, { "cell_type": "code", "execution_count": 2, "id": "a0365c4f-8cef-448b-b65e-e98daa98e34b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset>\n",
"Dimensions: (time: 15840, cml_id: 500, channel_id: 2)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 2018-05-10 ... 2018-05-20T23:59:00\n",
" * cml_id (cml_id) object '0' '1' '2' '3' ... '497' '498' '499'\n",
" length (cml_id) float64 ...\n",
" site_a_latitude (cml_id) float64 ...\n",
" site_a_longitude (cml_id) float64 ...\n",
" site_b_latitude (cml_id) float64 ...\n",
" site_b_longitude (cml_id) float64 ...\n",
" * channel_id (channel_id) object 'channel_1' 'channel_2'\n",
" frequency (cml_id, channel_id) float64 ...\n",
" polarization (cml_id, channel_id) object ...\n",
"Data variables:\n",
" rsl (channel_id, cml_id, time) float32 ...\n",
" tsl (channel_id, cml_id, time) float32 ...